
#region Using Statements

using System;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

#endregion

namespace HumanElement.Xna.Construct
{
    /// <summary>
    /// public class DebugConsole : 
    /// </summary>
    public class DebugConsole :  IRenderable, IDynamic
    {
        private SpriteFont font;

        private IContentManager content;
        private SpriteBatch batch;
        private StringBuilder sb;        
        
        /// <summary>
        /// Initializes a new instance of the <see cref="DebugConsole"/> class.
        /// </summary>
        public DebugConsole()  
        {
            sb = new StringBuilder();
         
        }

        /// <summary>
        /// Writes the line.
        /// </summary>
        /// <param name="line">The line.</param>
        /// <param name="args">The args.</param>
        public void WriteLine(string line, params string[] args)
        {
            sb.Append(string.Format(line, args));
        }

        /// <summary>
        /// Renders the specified device.
        /// </summary>
        /// <param name="device">The device.</param>
        /// <param name="viewport">The viewport.</param>
        public void Render(GraphicsDevice device, IViewport viewport)
        {
            
        }

        /// <summary>
        /// Loads the content.
        /// </summary>
        /// <param name="content">The content.</param>
        /// <returns></returns>
        public bool LoadContent(IContentManager content)
        {
            var ret = false;

            this.content = content;


            return ret;
        }

        /// <summary>
        /// Gets a value indicating whether this instance is loaded.
        /// </summary>
        /// <value><c>true</c> if this instance is loaded; otherwise, <c>false</c>.</value>
        public bool IsLoaded
        {
            get;
            private set;
        }

        /// <summary>
        /// Initializes the specified game host.
        /// </summary>
        public void Initialize<TGame>(TGame game) where TGame : IGame
        {


        }

        /// <summary>
        /// Updates the specified game time.
        /// </summary>
        /// <param name="gameTime">The game time.</param>
        public void Update(GameTime gameTime)
        {
            
        }

        /// <summary>
        /// Gets the last game time.
        /// </summary>
        /// <value>The last game time.</value>
        public GameTime LastGameTime
        {
            get;
            private set;
        }
        
        public void Initialize(IGame game)
        {
            this.sb = new StringBuilder();
            this.batch = new SpriteBatch(game.GraphicsDevice);
        }
    }
}